Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(steering-odometry): convert twist to steering angle #1288

Conversation

reinzor
Copy link
Contributor

@reinzor reinzor commented Sep 12, 2024

The logic in this function was incorrect, if we divide by 0., the input of the atan goes to inf which should result in PI/2 instead of 0.. What should be handled instead are nan values as an input of the atan function that can happen if we input 0./0..

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.36%. Comparing base (57c50e5) to head (a5f7f4d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1288      +/-   ##
==========================================
+ Coverage   80.34%   80.36%   +0.01%     
==========================================
  Files         105      105              
  Lines        9393     9391       -2     
  Branches      831      829       -2     
==========================================
  Hits         7547     7547              
  Misses       1570     1570              
+ Partials      276      274       -2     
Flag Coverage Δ
unittests 80.36% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ring_controllers_library/src/steering_odometry.cpp 81.52% <100.00%> (-0.12%) ⬇️

... and 2 files with indirect coverage changes

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, thanks!

@christophfroehlich christophfroehlich added backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron. labels Sep 12, 2024
Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, correct math is always correct

unless you do some crazy physics but oh well... :D

thank you!

@bmagyar bmagyar merged commit 50036e1 into ros-controls:master Sep 25, 2024
18 of 20 checks passed
mergify bot pushed a commit that referenced this pull request Sep 25, 2024
mergify bot pushed a commit that referenced this pull request Sep 25, 2024
christophfroehlich pushed a commit that referenced this pull request Sep 26, 2024
christophfroehlich pushed a commit that referenced this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants